<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body>
<script type="text/javascript">/* <![CDATA[ */
function get_sym_list(){return [];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class="c">&apos; The MIT License (MIT)</span>
<a class="l" name="2" href="#2">2</a><span class="c">&apos;</span>
<a class="l" name="3" href="#3">3</a><span class="c">&apos; Copyright (c) 2016 Tim Hall</span>
<a class="l" name="4" href="#4">4</a><span class="c">&apos;</span>
<a class="l" name="5" href="#5">5</a><span class="c">&apos; Permission is hereby granted, free of charge, to any person obtaining a copy</span>
<a class="l" name="6" href="#6">6</a><span class="c">&apos; of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
<a class="l" name="7" href="#7">7</a><span class="c">&apos; in the Software without restriction, including without limitation the rights</span>
<a class="l" name="8" href="#8">8</a><span class="c">&apos; to use, copy, modify, merge, publish, distribute, sublicense, <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> sell</span>
<a class="l" name="9" href="#9">9</a><span class="c">&apos; copies of the Software, and to permit persons to whom the Software is</span>
<a class="hl" name="10" href="#10">10</a><span class="c">&apos; furnished to do so, subject to the following conditions:</span>
<a class="l" name="11" href="#11">11</a><span class="c">&apos;</span>
<a class="l" name="12" href="#12">12</a><span class="c">&apos; The above copyright notice and this permission notice shall be included in all</span>
<a class="l" name="13" href="#13">13</a><span class="c">&apos; copies or substantial portions of the Software.</span>
<a class="l" name="14" href="#14">14</a><span class="c">&apos;</span>
<a class="l" name="15" href="#15">15</a><span class="c">&apos; THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<a class="l" name="16" href="#16">16</a><span class="c">&apos; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<a class="l" name="17" href="#17">17</a><span class="c">&apos; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
<a class="l" name="18" href="#18">18</a><span class="c">&apos; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<a class="l" name="19" href="#19">19</a><span class="c">&apos; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
<a class="hl" name="20" href="#20">20</a><span class="c">&apos; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<a class="l" name="21" href="#21">21</a><span class="c">&apos; SOFTWARE.</span>
<a class="l" name="22" href="#22">22</a>
<a class="l" name="23" href="#23">23</a><a href="/source/s?defs=VERSION" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VERSION</a> <span class="n">1.0</span> <b>CLASS</b>
<a class="l" name="24" href="#24">24</a><a href="/source/s?defs=BEGIN" class="intelliWindow-symbol" data-definition-place="undefined-in-file">BEGIN</a>
<a class="l" name="25" href="#25">25</a>  <a href="/source/s?defs=MultiUse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MultiUse</a> = <span class="n">-1</span>  <span class="c">&apos;True</span>
<a class="l" name="26" href="#26">26</a><b>END</b>
<a class="l" name="27" href="#27">27</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_Name</a> = <span class="s">&quot;WebResponse&quot;</span>
<a class="l" name="28" href="#28">28</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_GlobalNameSpace" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_GlobalNameSpace</a> = <b>False</b>
<a class="l" name="29" href="#29">29</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_Creatable" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_Creatable</a> = <b>False</b>
<a class="hl" name="30" href="#30">30</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_PredeclaredId" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_PredeclaredId</a> = <b>False</b>
<a class="l" name="31" href="#31">31</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_Exposed" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_Exposed</a> = <b>True</b>
<a class="l" name="32" href="#32">32</a><span class="c">&apos;&apos;</span>
<a class="l" name="33" href="#33">33</a><span class="c">&apos; WebResponse v4.1.3</span>
<a class="l" name="34" href="#34">34</a><span class="c">&apos; (c) Tim Hall - <a href="https://github.com/VBA-tools/VBA-Web">https://github.com/VBA-tools/VBA-Web</a></span>
<a class="l" name="35" href="#35">35</a><span class="c">&apos;</span>
<a class="l" name="36" href="#36">36</a><span class="c">&apos; Wrapper for <a href="/source/s?path=http/">http</a>/<a href="/source/s?path=http/cURL">cURL</a> responses that includes parsed Data based on WebRequest.ResponseFormat.</span>
<a class="l" name="37" href="#37">37</a><span class="c">&apos;</span>
<a class="l" name="38" href="#38">38</a><span class="c">&apos; Usage:</span>
<a class="l" name="39" href="#39">39</a><span class="c">&apos; ```VB.net</span>
<a class="hl" name="40" href="#40">40</a><span class="c">&apos; Dim Response As WebResponse</span>
<a class="l" name="41" href="#41">41</a><span class="c">&apos; Set Response = Client.Execute(Request)</span>
<a class="l" name="42" href="#42">42</a><span class="c">&apos;</span>
<a class="l" name="43" href="#43">43</a><span class="c">&apos; If Response.StatusCode = WebStatusCode.Ok Then</span>
<a class="l" name="44" href="#44">44</a><span class="c">&apos;   &apos; Response.Headers, Response.Cookies</span>
<a class="l" name="45" href="#45">45</a><span class="c">&apos;   &apos; Response.Data -&gt; Parsed Response.Content based on Request.ResponseFormat</span>
<a class="l" name="46" href="#46">46</a><span class="c">&apos;   &apos; Response.Body -&gt; Raw response bytes</span>
<a class="l" name="47" href="#47">47</a><span class="c">&apos; Else</span>
<a class="l" name="48" href="#48">48</a><span class="c">&apos;   Debug.Print &quot;Error: &quot; &amp; Response.StatusCode &amp; &quot; - &quot; &amp; Response.Content</span>
<a class="l" name="49" href="#49">49</a><span class="c">&apos; End If</span>
<a class="hl" name="50" href="#50">50</a><span class="c">&apos; ```</span>
<a class="l" name="51" href="#51">51</a><span class="c">&apos;</span>
<a class="l" name="52" href="#52">52</a><span class="c">&apos; Errors:</span>
<a class="l" name="53" href="#53">53</a><span class="c">&apos; 11030 / 80042b16 / -2147210474 - Error creating from http</span>
<a class="l" name="54" href="#54">54</a><span class="c">&apos; 11031 / 80042b17 / -2147210473 - Error creating from cURL</span>
<a class="l" name="55" href="#55">55</a><span class="c">&apos; 11032 / 80042b18 / -2147210472 - Error extracting headers</span>
<a class="l" name="56" href="#56">56</a><span class="c">&apos;</span>
<a class="l" name="57" href="#57">57</a><span class="c">&apos; @class WebResponse</span>
<a class="l" name="58" href="#58">58</a><span class="c">&apos; @author tim.hall.engr@gmail.com</span>
<a class="l" name="59" href="#59">59</a><span class="c">&apos; @license MIT (<a href="http://www.opensource.org/licenses/mit-license.php)">http://www.opensource.org/licenses/mit-license.php)</a></span>
<a class="hl" name="60" href="#60">60</a><span class="c">&apos;&apos; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ &apos;</span>
<a class="l" name="61" href="#61">61</a><b>Option</b> <a href="/source/s?defs=Explicit" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Explicit</a>
<a class="l" name="62" href="#62">62</a>
<a class="l" name="63" href="#63">63</a><b>Private</b> <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a> <b>As</b> <b>String</b>
<a class="l" name="64" href="#64">64</a>
<a class="l" name="65" href="#65">65</a><span class="c">&apos; --------------------------------------------- &apos;</span>
<a class="l" name="66" href="#66">66</a><span class="c">&apos; Properties</span>
<a class="l" name="67" href="#67">67</a><span class="c">&apos; --------------------------------------------- &apos;</span>
<a class="l" name="68" href="#68">68</a>
<a class="l" name="69" href="#69">69</a><span class="c">&apos;&apos;</span>
<a class="hl" name="70" href="#70">70</a><span class="c">&apos; Status code that the server returned (e.g. 200).</span>
<a class="l" name="71" href="#71">71</a><span class="c">&apos;</span>
<a class="l" name="72" href="#72">72</a><span class="c">&apos; @property StatusCode</span>
<a class="l" name="73" href="#73">73</a><span class="c">&apos; @type WebStatusCode</span>
<a class="l" name="74" href="#74">74</a><span class="c">&apos;&apos;</span>
<a class="l" name="75" href="#75">75</a><b>Public</b> <a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> <b>As</b> <a href="/source/s?defs=WebStatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebStatusCode</a>
<a class="l" name="76" href="#76">76</a>
<a class="l" name="77" href="#77">77</a><span class="c">&apos;&apos;</span>
<a class="l" name="78" href="#78">78</a><span class="c">&apos; Status string that the server returned (e.g. `404 -&gt; &quot;Not Found&quot;`)</span>
<a class="l" name="79" href="#79">79</a><span class="c">&apos;</span>
<a class="hl" name="80" href="#80">80</a><span class="c">&apos; @property StatusDescription</span>
<a class="l" name="81" href="#81">81</a><span class="c">&apos; @type String</span>
<a class="l" name="82" href="#82">82</a><span class="c">&apos;&apos;</span>
<a class="l" name="83" href="#83">83</a><b>Public</b> <a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> <b>As</b> <b>String</b>
<a class="l" name="84" href="#84">84</a>
<a class="l" name="85" href="#85">85</a><span class="c">&apos;&apos;</span>
<a class="l" name="86" href="#86">86</a><span class="c">&apos; Content string that the server returned.</span>
<a class="l" name="87" href="#87">87</a><span class="c">&apos;</span>
<a class="l" name="88" href="#88">88</a><span class="c">&apos; @property Content</span>
<a class="l" name="89" href="#89">89</a><span class="c">&apos; @type String</span>
<a class="hl" name="90" href="#90">90</a><span class="c">&apos;&apos;</span>
<a class="l" name="91" href="#91">91</a><b>Public</b> <a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> <b>As</b> <b>String</b>
<a class="l" name="92" href="#92">92</a>
<a class="l" name="93" href="#93">93</a><span class="c">&apos;&apos;</span>
<a class="l" name="94" href="#94">94</a><span class="c">&apos; Raw bytes for the response.</span>
<a class="l" name="95" href="#95">95</a><span class="c">&apos;</span>
<a class="l" name="96" href="#96">96</a><span class="c">&apos; @property Body</span>
<a class="l" name="97" href="#97">97</a><span class="c">&apos; @type Byte()</span>
<a class="l" name="98" href="#98">98</a><span class="c">&apos;&apos;</span>
<a class="l" name="99" href="#99">99</a><b>Public</b> <a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> <b>As</b> <b>Variant</b>
<a class="hl" name="100" href="#100">100</a>
<a class="l" name="101" href="#101">101</a><span class="c">&apos;&apos;</span>
<a class="l" name="102" href="#102">102</a><span class="c">&apos; Parsed `Content` or `Body` based on the `WebRequest.ResponseFormat`.</span>
<a class="l" name="103" href="#103">103</a><span class="c">&apos;</span>
<a class="l" name="104" href="#104">104</a><span class="c">&apos; @property Data</span>
<a class="l" name="105" href="#105">105</a><span class="c">&apos; @type Dictionary|Collection</span>
<a class="l" name="106" href="#106">106</a><span class="c">&apos;&apos;</span>
<a class="l" name="107" href="#107">107</a><b>Public</b> <a href="/source/s?defs=Data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Data</a> <b>As</b> <b>Object</b>
<a class="l" name="108" href="#108">108</a>
<a class="l" name="109" href="#109">109</a><span class="c">&apos;&apos;</span>
<a class="hl" name="110" href="#110">110</a><span class="c">&apos; Headers that were included with the response.</span>
<a class="l" name="111" href="#111">111</a><span class="c">&apos; (`Collection` of `KeyValue`)</span>
<a class="l" name="112" href="#112">112</a><span class="c">&apos;</span>
<a class="l" name="113" href="#113">113</a><span class="c">&apos; @property Headers</span>
<a class="l" name="114" href="#114">114</a><span class="c">&apos; @type Collection</span>
<a class="l" name="115" href="#115">115</a><span class="c">&apos;&apos;</span>
<a class="l" name="116" href="#116">116</a><b>Public</b> <a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>
<a class="l" name="117" href="#117">117</a>
<a class="l" name="118" href="#118">118</a><span class="c">&apos;&apos;</span>
<a class="l" name="119" href="#119">119</a><span class="c">&apos; Cookies that were included with the response.</span>
<a class="hl" name="120" href="#120">120</a><span class="c">&apos; (`Collection` of `KeyValue`)</span>
<a class="l" name="121" href="#121">121</a><span class="c">&apos;</span>
<a class="l" name="122" href="#122">122</a><span class="c">&apos; @property Cookies</span>
<a class="l" name="123" href="#123">123</a><span class="c">&apos; @type Collection</span>
<a class="l" name="124" href="#124">124</a><span class="c">&apos;&apos;</span>
<a class="l" name="125" href="#125">125</a><b>Public</b> <a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>
<a class="l" name="126" href="#126">126</a>
<a class="l" name="127" href="#127">127</a><span class="c">&apos; ============================================= &apos;</span>
<a class="l" name="128" href="#128">128</a><span class="c">&apos; Public Methods</span>
<a class="l" name="129" href="#129">129</a><span class="c">&apos; ============================================= &apos;</span>
<a class="hl" name="130" href="#130">130</a>
<a class="l" name="131" href="#131">131</a><span class="c">&apos;&apos;</span>
<a class="l" name="132" href="#132">132</a><span class="c">&apos; Helper for updating the response with the given updated response values.</span>
<a class="l" name="133" href="#133">133</a><span class="c">&apos; Useful for `ByRef` cases to update response in place.</span>
<a class="l" name="134" href="#134">134</a><span class="c">&apos;</span>
<a class="l" name="135" href="#135">135</a><span class="c">&apos; @method Update</span>
<a class="l" name="136" href="#136">136</a><span class="c">&apos; @param Updated {WebResponse} Updated `WebResponse` to pull updated values from</span>
<a class="l" name="137" href="#137">137</a><span class="c">&apos;&apos;</span>
<a class="l" name="138" href="#138">138</a><b>Public</b> <b>Sub</b> <a href="/source/s?defs=Update" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Update</a>(<a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a> <b>As</b> <a href="/source/s?defs=WebResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebResponse</a>)
<a class="l" name="139" href="#139">139</a>    <b>Me</b>.<a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a>
<a class="hl" name="140" href="#140">140</a>    <b>Me</b>.<a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a>
<a class="l" name="141" href="#141">141</a>    <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a>
<a class="l" name="142" href="#142">142</a>    <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a>
<a class="l" name="143" href="#143">143</a>    <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a>
<a class="l" name="144" href="#144">144</a>    <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a>
<a class="l" name="145" href="#145">145</a>    <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Data</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Data</a>
<a class="l" name="146" href="#146">146</a><b>End</b> <b>Sub</b>
<a class="l" name="147" href="#147">147</a>
<a class="l" name="148" href="#148">148</a><span class="c">&apos;&apos;</span>
<a class="l" name="149" href="#149">149</a><span class="c">&apos; Create response from http</span>
<a class="hl" name="150" href="#150">150</a><span class="c">&apos;</span>
<a class="l" name="151" href="#151">151</a><span class="c">&apos; @internal</span>
<a class="l" name="152" href="#152">152</a><span class="c">&apos; @method CreateFromHttp</span>
<a class="l" name="153" href="#153">153</a><span class="c">&apos; @param {WebClient} Client</span>
<a class="l" name="154" href="#154">154</a><span class="c">&apos; @param {WebRequest} Request</span>
<a class="l" name="155" href="#155">155</a><span class="c">&apos; @param {WinHttpRequest} Http</span>
<a class="l" name="156" href="#156">156</a><span class="c">&apos; @throws 11030 / 80042b16 / -2147210474 - Error creating from http</span>
<a class="l" name="157" href="#157">157</a><span class="c">&apos;&apos;</span>
<a class="l" name="158" href="#158">158</a><b>Public</b> <b>Sub</b> <a href="/source/s?defs=CreateFromHttp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CreateFromHttp</a>(<a href="/source/s?defs=Client" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Client</a> <b>As</b> <a href="/source/s?defs=WebClient" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebClient</a>, <a href="/source/s?defs=Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Request</a> <b>As</b> <a href="/source/s?defs=WebRequest" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebRequest</a>, <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a> <b>As</b> <b>Object</b>)
<a class="l" name="159" href="#159">159</a>    <b>On</b> <b>Error</b> <b>GoTo</b> <a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>
<a class="hl" name="160" href="#160">160</a>
<a class="l" name="161" href="#161">161</a>    <b>Me</b>.<a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> = <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=Status" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Status</a>
<a class="l" name="162" href="#162">162</a>    <b>Me</b>.<a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> = <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=StatusText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusText</a>
<a class="l" name="163" href="#163">163</a>    <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> = <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=ResponseText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseText</a>
<a class="l" name="164" href="#164">164</a>    <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> = <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=ResponseBody" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseBody</a>
<a class="l" name="165" href="#165">165</a>
<a class="l" name="166" href="#166">166</a>    <a href="/source/s?defs=web_LoadValues" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_LoadValues</a> <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=GetAllResponseHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">GetAllResponseHeaders</a>, <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a>, <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a>, <a href="/source/s?defs=Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Request</a>
<a class="l" name="167" href="#167">167</a>
<a class="l" name="168" href="#168">168</a>    <b>Exit</b> <b>Sub</b>
<a class="l" name="169" href="#169">169</a>
<a class="hl" name="170" href="#170">170</a><a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>:
<a class="l" name="171" href="#171">171</a>
<a class="l" name="172" href="#172">172</a>    <b>Dim</b> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> <b>As</b> <b>String</b>
<a class="l" name="173" href="#173">173</a>    <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> = <span class="s">&quot;An error occurred while creating response from http&quot;</span> &amp; <a href="/source/s?defs=vbNewLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbNewLine</a> &amp; _
<a class="l" name="174" href="#174">174</a>        <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> &amp; <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=IIf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IIf</a>(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> &lt; <span class="n">0</span>, <span class="s">&quot; (&quot;</span> &amp; <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=LCase" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LCase</a>$(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Hex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Hex</a>$(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a>)) &amp; <span class="s">&quot;)&quot;</span>, <span class="s">&quot;&quot;</span>) &amp; <span class="s">&quot;: &quot;</span> &amp; <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Description" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Description</a>
<a class="l" name="175" href="#175">175</a>
<a class="l" name="176" href="#176">176</a>    <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogError</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>, <span class="s">&quot;WebResponse.CreateFromHttp&quot;</span>, <span class="n">11030</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>
<a class="l" name="177" href="#177">177</a>    <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Raise" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Raise</a> <span class="n">11030</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>, <span class="s">&quot;WebResponse.CreateFromHttp&quot;</span>, <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>
<a class="l" name="178" href="#178">178</a><b>End</b> <b>Sub</b>
<a class="l" name="179" href="#179">179</a>
<a class="hl" name="180" href="#180">180</a><span class="c">&apos;&apos;</span>
<a class="l" name="181" href="#181">181</a><span class="c">&apos; Create response from cURL</span>
<a class="l" name="182" href="#182">182</a><span class="c">&apos;</span>
<a class="l" name="183" href="#183">183</a><span class="c">&apos; @internal</span>
<a class="l" name="184" href="#184">184</a><span class="c">&apos; @method CreateFromCurl</span>
<a class="l" name="185" href="#185">185</a><span class="c">&apos; @param {WebClient} Client</span>
<a class="l" name="186" href="#186">186</a><span class="c">&apos; @param {WebRequest} Request</span>
<a class="l" name="187" href="#187">187</a><span class="c">&apos; @param {String} Result</span>
<a class="l" name="188" href="#188">188</a><span class="c">&apos; @throws 11031 / 80042b17 / -2147210473 - Error creating from cURL</span>
<a class="l" name="189" href="#189">189</a><span class="c">&apos;&apos;</span>
<a class="hl" name="190" href="#190">190</a><b>Public</b> <b>Sub</b> <a href="/source/s?defs=CreateFromCurl" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CreateFromCurl</a>(<a href="/source/s?defs=Client" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Client</a> <b>As</b> <a href="/source/s?defs=WebClient" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebClient</a>, <a href="/source/s?defs=Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Request</a> <b>As</b> <a href="/source/s?defs=WebRequest" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebRequest</a>, <a href="/source/s?defs=Result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Result</a> <b>As</b> <b>String</b>)
<a class="l" name="191" href="#191">191</a>    <b>On</b> <b>Error</b> <b>GoTo</b> <a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>
<a class="l" name="192" href="#192">192</a>
<a class="l" name="193" href="#193">193</a>    <b>Dim</b> <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>() <b>As</b> <b>String</b>
<a class="l" name="194" href="#194">194</a>
<a class="l" name="195" href="#195">195</a>    <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=Result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Result</a>, <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a>)
<a class="l" name="196" href="#196">196</a>
<a class="l" name="197" href="#197">197</a>    <b>Me</b>.<a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> = <a href="/source/s?defs=web_ExtractStatusFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusFromCurlResponse</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>)
<a class="l" name="198" href="#198">198</a>    <b>Me</b>.<a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> = <a href="/source/s?defs=web_ExtractStatusTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusTextFromCurlResponse</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>)
<a class="l" name="199" href="#199">199</a>    <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> = <a href="/source/s?defs=web_ExtractResponseTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractResponseTextFromCurlResponse</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>)
<a class="hl" name="200" href="#200">200</a>    <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> = <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=StringToAnsiBytes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StringToAnsiBytes</a>(<b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a>)
<a class="l" name="201" href="#201">201</a>
<a class="l" name="202" href="#202">202</a>    <a href="/source/s?defs=web_LoadValues" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_LoadValues</a> <a href="/source/s?defs=web_ExtractHeadersFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractHeadersFromCurlResponse</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>), <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a>, <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a>, <a href="/source/s?defs=Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Request</a>
<a class="l" name="203" href="#203">203</a>
<a class="l" name="204" href="#204">204</a>    <b>Exit</b> <b>Sub</b>
<a class="l" name="205" href="#205">205</a>
<a class="l" name="206" href="#206">206</a><a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>:
<a class="l" name="207" href="#207">207</a>
<a class="l" name="208" href="#208">208</a>    <b>Dim</b> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> <b>As</b> <b>String</b>
<a class="l" name="209" href="#209">209</a>    <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> = <span class="s">&quot;An error occurred while creating response from cURL&quot;</span> &amp; <a href="/source/s?defs=vbNewLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbNewLine</a> &amp; _
<a class="hl" name="210" href="#210">210</a>        <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> &amp; <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=IIf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IIf</a>(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> &lt; <span class="n">0</span>, <span class="s">&quot; (&quot;</span> &amp; <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=LCase" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LCase</a>$(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Hex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Hex</a>$(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a>)) &amp; <span class="s">&quot;)&quot;</span>, <span class="s">&quot;&quot;</span>) &amp; <span class="s">&quot;: &quot;</span> &amp; <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Description" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Description</a>
<a class="l" name="211" href="#211">211</a>
<a class="l" name="212" href="#212">212</a>    <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogError</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>, <span class="s">&quot;WebResponse.CreateFromCurl&quot;</span>, <span class="n">11031</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>
<a class="l" name="213" href="#213">213</a>    <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Raise" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Raise</a> <span class="n">11031</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>, <span class="s">&quot;WebResponse.CreateFromCurl&quot;</span>, <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>
<a class="l" name="214" href="#214">214</a><b>End</b> <b>Sub</b>
<a class="l" name="215" href="#215">215</a>
<a class="l" name="216" href="#216">216</a><span class="c">&apos;&apos;</span>
<a class="l" name="217" href="#217">217</a><span class="c">&apos; Extract headers from response headers</span>
<a class="l" name="218" href="#218">218</a><span class="c">&apos;</span>
<a class="l" name="219" href="#219">219</a><span class="c">&apos; @internal</span>
<a class="hl" name="220" href="#220">220</a><span class="c">&apos; @method ExtractHeaders</span>
<a class="l" name="221" href="#221">221</a><span class="c">&apos; @param {String} ResponseHeaders</span>
<a class="l" name="222" href="#222">222</a><span class="c">&apos; @return {Collection} Headers</span>
<a class="l" name="223" href="#223">223</a><span class="c">&apos; @throws 11032 / 80042b18 / -2147210472 - Error extracting headers</span>
<a class="l" name="224" href="#224">224</a><span class="c">&apos;&apos;</span>
<a class="l" name="225" href="#225">225</a><b>Public</b> <b>Function</b> <a href="/source/s?defs=ExtractHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractHeaders</a>(<a href="/source/s?defs=ResponseHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseHeaders</a> <b>As</b> <b>String</b>) <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>
<a class="l" name="226" href="#226">226</a>    <b>On</b> <b>Error</b> <b>GoTo</b> <a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>
<a class="l" name="227" href="#227">227</a>
<a class="l" name="228" href="#228">228</a>    <b>Dim</b> <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a> <b>As</b> <b>Variant</b>
<a class="l" name="229" href="#229">229</a>    <b>Dim</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> <b>As</b> <b>Integer</b>
<a class="hl" name="230" href="#230">230</a>    <b>Dim</b> <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a> <b>As</b> <b>New</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>
<a class="l" name="231" href="#231">231</a>    <b>Dim</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>As</b> <a href="/source/s?defs=Dictionary" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Dictionary</a>
<a class="l" name="232" href="#232">232</a>    <b>Dim</b> <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> <b>As</b> <b>Long</b>
<a class="l" name="233" href="#233">233</a>    <b>Dim</b> <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> <b>As</b> <b>Boolean</b>
<a class="l" name="234" href="#234">234</a>
<a class="l" name="235" href="#235">235</a>    <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=ResponseHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseHeaders</a>, <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a>)
<a class="l" name="236" href="#236">236</a>
<a class="l" name="237" href="#237">237</a>    <b>For</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> = <a href="/source/s?defs=LBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LBound</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) <b>To</b> (<a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) + <span class="n">1</span>)
<a class="l" name="238" href="#238">238</a>        <b>If</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> &gt; <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) <b>Then</b>
<a class="l" name="239" href="#239">239</a>            <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>
<a class="hl" name="240" href="#240">240</a>        <b>ElseIf</b> <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>) &lt;&gt; <span class="s">&quot;&quot;</span> <b>Then</b>
<a class="l" name="241" href="#241">241</a>            <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>), <span class="s">&quot;:&quot;</span>)
<a class="l" name="242" href="#242">242</a>            <b>If</b> <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> = <span class="n">0</span> <b>And</b> <b>Not</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>Is</b> <b>Nothing</b> <b>Then</b>
<a class="l" name="243" href="#243">243</a>                <span class="c">&apos; Assume part of multi-line header</span>
<a class="l" name="244" href="#244">244</a>                <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> = <b>True</b>
<a class="l" name="245" href="#245">245</a>            <b>ElseIf</b> <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> <b>Then</b>
<a class="l" name="246" href="#246">246</a>                <span class="c">&apos; Close out multi-line string</span>
<a class="l" name="247" href="#247">247</a>                <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> = <b>False</b>
<a class="l" name="248" href="#248">248</a>                <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>
<a class="l" name="249" href="#249">249</a>            <b>ElseIf</b> <b>Not</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>Is</b> <b>Nothing</b> <b>Then</b>
<a class="hl" name="250" href="#250">250</a>                <span class="c">&apos; Add previous header</span>
<a class="l" name="251" href="#251">251</a>                <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>
<a class="l" name="252" href="#252">252</a>            <b>End</b> <b>If</b>
<a class="l" name="253" href="#253">253</a>
<a class="l" name="254" href="#254">254</a>            <b>If</b> <b>Not</b> <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> <b>Then</b>
<a class="l" name="255" href="#255">255</a>                <b>Set</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> = <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=CreateKeyValue" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CreateKeyValue</a>( _
<a class="l" name="256" href="#256">256</a>                    <a href="/source/s?defs=Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Key</a>:=<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Trim" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Trim</a>(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>), <span class="n">1</span>, <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> - <span class="n">1</span>)), _
<a class="l" name="257" href="#257">257</a>                    <a href="/source/s?defs=Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Value</a>:=<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Trim" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Trim</a>(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>), <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> + <span class="n">1</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Len" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Len</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>)))) _
<a class="l" name="258" href="#258">258</a>                )
<a class="l" name="259" href="#259">259</a>            <b>Else</b>
<a class="hl" name="260" href="#260">260</a>                <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>(<span class="s">&quot;Value&quot;</span>) = <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>(<span class="s">&quot;Value&quot;</span>) &amp; <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a> &amp; <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>)
<a class="l" name="261" href="#261">261</a>            <b>End</b> <b>If</b>
<a class="l" name="262" href="#262">262</a>        <b>End</b> <b>If</b>
<a class="l" name="263" href="#263">263</a>    <b>Next</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>
<a class="l" name="264" href="#264">264</a>
<a class="l" name="265" href="#265">265</a>    <b>Set</b> <a href="/source/s?defs=ExtractHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractHeaders</a> = <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>
<a class="l" name="266" href="#266">266</a>    <b>Exit</b> <b>Function</b>
<a class="l" name="267" href="#267">267</a>
<a class="l" name="268" href="#268">268</a><a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>:
<a class="l" name="269" href="#269">269</a>
<a class="hl" name="270" href="#270">270</a>    <b>Dim</b> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> <b>As</b> <b>String</b>
<a class="l" name="271" href="#271">271</a>    <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> = <span class="s">&quot;An error occurred while extracting headers&quot;</span> &amp; <a href="/source/s?defs=vbNewLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbNewLine</a> &amp; _
<a class="l" name="272" href="#272">272</a>        <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> &amp; <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=IIf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IIf</a>(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> &lt; <span class="n">0</span>, <span class="s">&quot; (&quot;</span> &amp; <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=LCase" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LCase</a>$(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Hex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Hex</a>$(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a>)) &amp; <span class="s">&quot;)&quot;</span>, <span class="s">&quot;&quot;</span>) &amp; <span class="s">&quot;: &quot;</span> &amp; <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Description" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Description</a>
<a class="l" name="273" href="#273">273</a>
<a class="l" name="274" href="#274">274</a>    <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogError</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>, <span class="s">&quot;WebResponse.CreateFromCurl&quot;</span>, <span class="n">11032</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>
<a class="l" name="275" href="#275">275</a>    <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Raise" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Raise</a> <span class="n">11032</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>, <span class="s">&quot;WebResponse.CreateFromCurl&quot;</span>, <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>
<a class="l" name="276" href="#276">276</a><b>End</b> <b>Function</b>
<a class="l" name="277" href="#277">277</a>
<a class="l" name="278" href="#278">278</a><span class="c">&apos;&apos;</span>
<a class="l" name="279" href="#279">279</a><span class="c">&apos; Extract cookies from response headers</span>
<a class="hl" name="280" href="#280">280</a><span class="c">&apos;</span>
<a class="l" name="281" href="#281">281</a><span class="c">&apos; @internal</span>
<a class="l" name="282" href="#282">282</a><span class="c">&apos; @method ExtractCookies</span>
<a class="l" name="283" href="#283">283</a><span class="c">&apos; @param {Collection} Headers</span>
<a class="l" name="284" href="#284">284</a><span class="c">&apos; @return {Collection} Cookies</span>
<a class="l" name="285" href="#285">285</a><span class="c">&apos;&apos;</span>
<a class="l" name="286" href="#286">286</a><b>Public</b> <b>Function</b> <a href="/source/s?defs=ExtractCookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractCookies</a>(<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>) <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>
<a class="l" name="287" href="#287">287</a>    <b>Dim</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>As</b> <a href="/source/s?defs=Dictionary" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Dictionary</a>
<a class="l" name="288" href="#288">288</a>    <b>Dim</b> <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a> <b>As</b> <b>String</b>
<a class="l" name="289" href="#289">289</a>    <b>Dim</b> <a href="/source/s?defs=web_Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Key</a> <b>As</b> <b>String</b>
<a class="hl" name="290" href="#290">290</a>    <b>Dim</b> <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a> <b>As</b> <b>String</b>
<a class="l" name="291" href="#291">291</a>    <b>Dim</b> <a href="/source/s?defs=web_Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookies</a> <b>As</b> <b>New</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>
<a class="l" name="292" href="#292">292</a>
<a class="l" name="293" href="#293">293</a>    <b>For</b> <b>Each</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>In</b> <a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a>
<a class="l" name="294" href="#294">294</a>        <b>If</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>(<span class="s">&quot;Key&quot;</span>) = <span class="s">&quot;Set-Cookie&quot;</span> <b>Then</b>
<a class="l" name="295" href="#295">295</a>            <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a> = <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>(<span class="s">&quot;Value&quot;</span>)
<a class="l" name="296" href="#296">296</a>            <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="s">&quot;=&quot;</span>) &gt; <span class="n">0</span> <b>Then</b>
<a class="l" name="297" href="#297">297</a>                <a href="/source/s?defs=web_Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Key</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="n">1</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="s">&quot;=&quot;</span>) - <span class="n">1</span>)
<a class="l" name="298" href="#298">298</a>                <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="s">&quot;=&quot;</span>) + <span class="n">1</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Len" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Len</a>(<a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>))
<a class="l" name="299" href="#299">299</a>
<a class="hl" name="300" href="#300">300</a>                <span class="c">&apos; Ignore text after semi-colon</span>
<a class="l" name="301" href="#301">301</a>                <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="s">&quot;;&quot;</span>) &gt; <span class="n">0</span> <b>Then</b>
<a class="l" name="302" href="#302">302</a>                    <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="n">1</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="s">&quot;;&quot;</span>) - <span class="n">1</span>)
<a class="l" name="303" href="#303">303</a>                <b>End</b> <b>If</b>
<a class="l" name="304" href="#304">304</a>
<a class="l" name="305" href="#305">305</a>                <span class="c">&apos; Ignore surrounding quotes</span>
<a class="l" name="306" href="#306">306</a>                <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Left" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Left</a>$(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="n">1</span>) = <span class="s">&quot;&quot;&quot;&quot;</span> <b>Then</b>
<a class="l" name="307" href="#307">307</a>                    <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="n">2</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Len" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Len</a>(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>) - <span class="n">2</span>)
<a class="l" name="308" href="#308">308</a>                <b>End</b> <b>If</b>
<a class="l" name="309" href="#309">309</a>
<a class="hl" name="310" href="#310">310</a>                <a href="/source/s?defs=web_Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookies</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a> <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=CreateKeyValue" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CreateKeyValue</a>(<a href="/source/s?defs=web_Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Key</a>, <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=UrlDecode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UrlDecode</a>(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <a href="/source/s?defs=PlusAsSpace" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PlusAsSpace</a>:=<b>False</b>, <a href="/source/s?defs=EncodingMode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">EncodingMode</a>:=<a href="/source/s?defs=UrlEncodingMode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UrlEncodingMode</a>.<a href="/source/s?defs=CookieUrlEncoding" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CookieUrlEncoding</a>))
<a class="l" name="311" href="#311">311</a>            <b>Else</b>
<a class="l" name="312" href="#312">312</a>                <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogWarning" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogWarning</a> _
<a class="l" name="313" href="#313">313</a>                    <span class="s">&quot;Unrecognized cookie format: &quot;</span> &amp; <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="s">&quot;WebResponse.ExtractCookies&quot;</span>
<a class="l" name="314" href="#314">314</a>            <b>End</b> <b>If</b>
<a class="l" name="315" href="#315">315</a>        <b>End</b> <b>If</b>
<a class="l" name="316" href="#316">316</a>    <b>Next</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>
<a class="l" name="317" href="#317">317</a>
<a class="l" name="318" href="#318">318</a>    <b>Set</b> <a href="/source/s?defs=ExtractCookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractCookies</a> = <a href="/source/s?defs=web_Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookies</a>
<a class="l" name="319" href="#319">319</a><b>End</b> <b>Function</b>
<a class="hl" name="320" href="#320">320</a>
<a class="l" name="321" href="#321">321</a><span class="c">&apos; ============================================= &apos;</span>
<a class="l" name="322" href="#322">322</a><span class="c">&apos; Private Functions</span>
<a class="l" name="323" href="#323">323</a><span class="c">&apos; ============================================= &apos;</span>
<a class="l" name="324" href="#324">324</a>
<a class="l" name="325" href="#325">325</a><b>Private</b> <b>Sub</b> <a href="/source/s?defs=web_LoadValues" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_LoadValues</a>(<a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a> <b>As</b> <b>String</b>, <a href="/source/s?defs=web_Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Content</a> <b>As</b> <b>String</b>, <a href="/source/s?defs=web_Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Body</a> <b>As</b> <b>Variant</b>, <a href="/source/s?defs=web_Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Request</a> <b>As</b> <a href="/source/s?defs=WebRequest" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebRequest</a>)
<a class="l" name="326" href="#326">326</a>    <span class="c">&apos; Convert content to data by format</span>
<a class="l" name="327" href="#327">327</a>    <b>If</b> <a href="/source/s?defs=web_Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Request</a>.<a href="/source/s?defs=ResponseFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseFormat</a> &lt;&gt; <a href="/source/s?defs=WebFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebFormat</a>.<a href="/source/s?defs=PlainText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PlainText</a> <b>Then</b>
<a class="l" name="328" href="#328">328</a>        <b>On</b> <b>Error</b> <b>Resume</b> <b>Next</b>
<a class="l" name="329" href="#329">329</a>        <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Data</a> = _
<a class="hl" name="330" href="#330">330</a>            <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=ParseByFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParseByFormat</a>(<a href="/source/s?defs=web_Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Content</a>, <a href="/source/s?defs=web_Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Request</a>.<a href="/source/s?defs=ResponseFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseFormat</a>, <a href="/source/s?defs=web_Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Request</a>.<a href="/source/s?defs=CustomResponseFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CustomResponseFormat</a>, <a href="/source/s?defs=web_Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Body</a>)
<a class="l" name="331" href="#331">331</a>
<a class="l" name="332" href="#332">332</a>        <b>If</b> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> &lt;&gt; <span class="n">0</span> <b>Then</b>
<a class="l" name="333" href="#333">333</a>            <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogError</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Description" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Description</a>, <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Source" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Source</a>, <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a>
<a class="l" name="334" href="#334">334</a>            <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Clear" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Clear</a>
<a class="l" name="335" href="#335">335</a>        <b>End</b> <b>If</b>
<a class="l" name="336" href="#336">336</a>        <b>On</b> <b>Error</b> <b>GoTo</b> <span class="n">0</span>
<a class="l" name="337" href="#337">337</a>    <b>End</b> <b>If</b>
<a class="l" name="338" href="#338">338</a>
<a class="l" name="339" href="#339">339</a>    <span class="c">&apos; Extract headers</span>
<a class="hl" name="340" href="#340">340</a>    <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> = <a href="/source/s?defs=ExtractHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractHeaders</a>(<a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>)
<a class="l" name="341" href="#341">341</a>
<a class="l" name="342" href="#342">342</a>    <span class="c">&apos; Extract cookies</span>
<a class="l" name="343" href="#343">343</a>    <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> = <a href="/source/s?defs=ExtractCookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractCookies</a>(<b>Me</b>.<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a>)
<a class="l" name="344" href="#344">344</a><b>End</b> <b>Sub</b>
<a class="l" name="345" href="#345">345</a>
<a class="l" name="346" href="#346">346</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_ExtractStatusFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusFromCurlResponse</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>Long</b>
<a class="l" name="347" href="#347">347</a>    <b>Dim</b> <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a>() <b>As</b> <b>String</b>
<a class="l" name="348" href="#348">348</a>
<a class="l" name="349" href="#349">349</a>    <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)), <span class="s">&quot; &quot;</span>)
<a class="hl" name="350" href="#350">350</a>    <a href="/source/s?defs=web_ExtractStatusFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusFromCurlResponse</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<b>CLng</b>(<a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a>(<span class="n">1</span>))
<a class="l" name="351" href="#351">351</a><b>End</b> <b>Function</b>
<a class="l" name="352" href="#352">352</a>
<a class="l" name="353" href="#353">353</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_ExtractStatusTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusTextFromCurlResponse</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>String</b>
<a class="l" name="354" href="#354">354</a>    <b>Dim</b> <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a>() <b>As</b> <b>String</b>
<a class="l" name="355" href="#355">355</a>    <b>Dim</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> <b>As</b> <b>Long</b>
<a class="l" name="356" href="#356">356</a>    <b>Dim</b> <a href="/source/s?defs=web_StatusText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusText</a> <b>As</b> <b>String</b>
<a class="l" name="357" href="#357">357</a>
<a class="l" name="358" href="#358">358</a>    <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)), <span class="s">&quot; &quot;</span>, <span class="n">3</span>)
<a class="l" name="359" href="#359">359</a>    <a href="/source/s?defs=web_ExtractStatusTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusTextFromCurlResponse</a> = <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a>(<span class="n">2</span>)
<a class="hl" name="360" href="#360">360</a><b>End</b> <b>Function</b>
<a class="l" name="361" href="#361">361</a>
<a class="l" name="362" href="#362">362</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_ExtractHeadersFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractHeadersFromCurlResponse</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>String</b>
<a class="l" name="363" href="#363">363</a>    <b>Dim</b> <a href="/source/s?defs=web_StatusLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineIndex</a> <b>As</b> <b>Long</b>
<a class="l" name="364" href="#364">364</a>    <b>Dim</b> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> <b>As</b> <b>Long</b>
<a class="l" name="365" href="#365">365</a>    <b>Dim</b> <a href="/source/s?defs=web_HeaderLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_HeaderLines</a>() <b>As</b> <b>String</b>
<a class="l" name="366" href="#366">366</a>    <b>Dim</b> <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> <b>As</b> <b>Long</b>
<a class="l" name="367" href="#367">367</a>    <b>Dim</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> <b>As</b> <b>Long</b>
<a class="l" name="368" href="#368">368</a>
<a class="l" name="369" href="#369">369</a>    <span class="c">&apos; Find status line and blank line before body</span>
<a class="hl" name="370" href="#370">370</a>    <a href="/source/s?defs=web_StatusLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineIndex</a> = <a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)
<a class="l" name="371" href="#371">371</a>    <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> = <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)
<a class="l" name="372" href="#372">372</a>
<a class="l" name="373" href="#373">373</a>    <span class="c">&apos; Extract headers string</span>
<a class="l" name="374" href="#374">374</a>    <b>ReDim</b> <a href="/source/s?defs=web_HeaderLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_HeaderLines</a>(<span class="n">0</span> <b>To</b> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> - <span class="n">2</span> - <a href="/source/s?defs=web_StatusLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineIndex</a>)
<a class="l" name="375" href="#375">375</a>
<a class="l" name="376" href="#376">376</a>    <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> = <span class="n">0</span>
<a class="l" name="377" href="#377">377</a>    <b>For</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> = (<a href="/source/s?defs=web_StatusLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineIndex</a> + <span class="n">1</span>) <b>To</b> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> - <span class="n">1</span>
<a class="l" name="378" href="#378">378</a>        <a href="/source/s?defs=web_HeaderLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_HeaderLines</a>(<a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a>) = <a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a>)
<a class="l" name="379" href="#379">379</a>        <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> = <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> + <span class="n">1</span>
<a class="hl" name="380" href="#380">380</a>    <b>Next</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a>
<a class="l" name="381" href="#381">381</a>
<a class="l" name="382" href="#382">382</a>    <a href="/source/s?defs=web_ExtractHeadersFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractHeadersFromCurlResponse</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Join" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Join</a>$(<a href="/source/s?defs=web_HeaderLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_HeaderLines</a>, <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a>)
<a class="l" name="383" href="#383">383</a><b>End</b> <b>Function</b>
<a class="l" name="384" href="#384">384</a>
<a class="l" name="385" href="#385">385</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_ExtractResponseTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractResponseTextFromCurlResponse</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>String</b>
<a class="l" name="386" href="#386">386</a>    <b>Dim</b> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> <b>As</b> <b>Long</b>
<a class="l" name="387" href="#387">387</a>    <b>Dim</b> <a href="/source/s?defs=web_BodyLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BodyLines</a>() <b>As</b> <b>String</b>
<a class="l" name="388" href="#388">388</a>    <b>Dim</b> <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> <b>As</b> <b>Long</b>
<a class="l" name="389" href="#389">389</a>    <b>Dim</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> <b>As</b> <b>Long</b>
<a class="hl" name="390" href="#390">390</a>
<a class="l" name="391" href="#391">391</a>    <span class="c">&apos; Find blank line before body</span>
<a class="l" name="392" href="#392">392</a>    <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> = <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)
<a class="l" name="393" href="#393">393</a>
<a class="l" name="394" href="#394">394</a>    <span class="c">&apos; Extract body string</span>
<a class="l" name="395" href="#395">395</a>    <b>ReDim</b> <a href="/source/s?defs=web_BodyLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BodyLines</a>(<span class="n">0</span> <b>To</b> <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) - <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> - <span class="n">1</span>)
<a class="l" name="396" href="#396">396</a>
<a class="l" name="397" href="#397">397</a>    <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> = <span class="n">0</span>
<a class="l" name="398" href="#398">398</a>    <b>For</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> = <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> + <span class="n">1</span> <b>To</b> <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)
<a class="l" name="399" href="#399">399</a>        <a href="/source/s?defs=web_BodyLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BodyLines</a>(<a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a>) = <a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a>)
<a class="hl" name="400" href="#400">400</a>        <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> = <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> + <span class="n">1</span>
<a class="l" name="401" href="#401">401</a>    <b>Next</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a>
<a class="l" name="402" href="#402">402</a>
<a class="l" name="403" href="#403">403</a>    <a href="/source/s?defs=web_ExtractResponseTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractResponseTextFromCurlResponse</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Join" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Join</a>$(<a href="/source/s?defs=web_BodyLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BodyLines</a>, <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a>)
<a class="l" name="404" href="#404">404</a><b>End</b> <b>Function</b>
<a class="l" name="405" href="#405">405</a>
<a class="l" name="406" href="#406">406</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>Long</b>
<a class="l" name="407" href="#407">407</a>    <span class="c">&apos; Special case for cURL: 100 Continue is included before final status code</span>
<a class="l" name="408" href="#408">408</a>    <span class="c">&apos; -&gt; ignore 100 and find final status code (next non-100 status code)</span>
<a class="l" name="409" href="#409">409</a>    <b>For</b> <a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a> = <a href="/source/s?defs=LBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) <b>To</b> <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)
<a class="hl" name="410" href="#410">410</a>        <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Trim" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Trim</a>$(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>)) &lt;&gt; <span class="s">&quot;&quot;</span> <b>Then</b>
<a class="l" name="411" href="#411">411</a>            <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>), <span class="s">&quot; &quot;</span>)(<span class="n">1</span>) &lt;&gt; <span class="s">&quot;100&quot;</span> <b>Then</b>
<a class="l" name="412" href="#412">412</a>                <b>Exit</b> <b>Function</b>
<a class="l" name="413" href="#413">413</a>            <b>End</b> <b>If</b>
<a class="l" name="414" href="#414">414</a>        <b>End</b> <b>If</b>
<a class="l" name="415" href="#415">415</a>    <b>Next</b> <a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>
<a class="l" name="416" href="#416">416</a><b>End</b> <b>Function</b>
<a class="l" name="417" href="#417">417</a>
<a class="l" name="418" href="#418">418</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>Long</b>
<a class="l" name="419" href="#419">419</a>    <b>For</b> <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a> = (<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) + <span class="n">1</span>) <b>To</b> <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)
<a class="hl" name="420" href="#420">420</a>        <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Trim" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Trim</a>$(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>)) = <span class="s">&quot;&quot;</span> <b>Then</b>
<a class="l" name="421" href="#421">421</a>            <b>Exit</b> <b>Function</b>
<a class="l" name="422" href="#422">422</a>        <b>End</b> <b>If</b>
<a class="l" name="423" href="#423">423</a>    <b>Next</b> <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>
<a class="l" name="424" href="#424">424</a><b>End</b> <b>Function</b>
<a class="l" name="425" href="#425">425</a>
<a class="l" name="426" href="#426">426</a><b>Private</b> <b>Sub</b> <a href="/source/s?defs=Class_Initialize" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Class_Initialize</a>()
<a class="l" name="427" href="#427">427</a>    <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Chr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Chr</a>$(<span class="n">&amp;HA</span>) &amp; <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Chr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Chr</a>$(<span class="n">&amp;o12</span>)
<a class="l" name="428" href="#428">428</a>
<a class="l" name="429" href="#429">429</a>    <b>Set</b> <a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> = <b>New</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>
<a class="hl" name="430" href="#430">430</a>    <b>Set</b> <a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> = <b>New</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>
<a class="l" name="431" href="#431">431</a><b>End</b> <b>Sub</b>
<a class="l" name="432" href="#432">432</a>
<a class="l" name="433" href="#433">433</a><b>Private</b> <b>Sub</b> <a href="/source/s?defs=Test_strings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Test_strings</a>()
<a class="l" name="434" href="#434">434</a>    <b>Dim</b> <a href="/source/s?defs=foo1" class="intelliWindow-symbol" data-definition-place="undefined-in-file">foo1</a>() <b>As</b> <b>String</b>
<a class="l" name="435" href="#435">435</a>    <b>Set</b> <a href="/source/s?defs=foo1" class="intelliWindow-symbol" data-definition-place="undefined-in-file">foo1</a> = <span class="s">&quot; testing</span>
<a class="l" name="436" href="#436">436</a><span class="s">    1-2-3&quot;</span>
<a class="l" name="437" href="#437">437</a><b>End</b> <b>Sub</b>
<a class="l" name="438" href="#438">438</a></body>
</html>
